home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Conversion / Convert_RTF / Source / rtfFile.h < prev    next >
Text File  |  1993-10-02  |  4KB  |  113 lines

  1. /***********************************************************************\
  2. rtf file class for Convert RTF which converts between Mac and NeXT rtf formats.
  3. Copyright (C) 1993 David John Burrowes
  4.  
  5. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.
  6.  
  7. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  8.  
  9. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  10.  
  11. The author, David John Burrowes, can be reached at:
  12.     davidjohn@kira.net.netcom.com
  13.     David John Burrowes
  14.     1926 Ivy #10
  15.     San Mateo, CA 94403-1367
  16. \***********************************************************************/
  17.  
  18. /*
  19. ====================================================================
  20. This is the interface file for the rtfFile class.  Full documentation for this class can be found in the rtfFile.rtf file.  I will not duplicate all that fine information here.
  21.     This is $Revision: 1.9 $ of this file
  22.     It was last modified by $Author: death $ on $Date: 93/04/04 23:28:31 $
  23. Note that this file was created while using the New Century Schoolbook Roman typeface.  You may find that some things line up strangely if you don't use that family.
  24.  *$Log:    rtfFile.h,v $
  25.  * Revision 1.9  93/04/04  23:28:31  death
  26.  * Sun Apr  4 23:28:31 PDT 1993
  27.  * 
  28.  * Revision 1.8  93/02/21  12:00:10  death
  29.  * Sun Feb 21 12:00:09 PST 1993
  30.  * 
  31.  * Revision 1.7  93/01/10  08:27:30  death
  32.  * Sun Jan 10 08:27:30 PST 1993
  33.  * 
  34.  * Revision 1.6  93/01/02  23:41:39  death
  35.  * Sat Jan  2 23:41:39 PST 1993
  36.  * 
  37.  * Revision 1.5  93/01/02  13:39:08  death
  38.  * Sat Jan  2 13:39:07 PST 1993
  39.  * 
  40.  * Revision 1.4  92/12/25  16:26:59  death
  41.  * Fri Dec 25 16:26:58 PST 1992
  42.  * 
  43.  * Revision 1.3  92/12/21  07:01:25  death
  44.  * Mon Dec 21 07:01:23 PST 1992
  45.  * 
  46.  * Revision 1.2  92/12/19  08:19:15  death
  47.  * Sat Dec 19 08:19:15 PST 1992
  48.  * 
  49.  * Revision 1.1  92/12/13  10:01:34  death
  50.  * Sun Dec 13 10:01:34 PST 1992
  51.  * 
  52.  * 
  53. ====================================================================
  54.  */
  55.  
  56. //
  57. // Import our parent class' definition
  58. //
  59. #import "TextFile.h"
  60. #import "common.h"
  61. #import "rtfToken.h"
  62. //
  63. //    Different hints (suggestsions) that can be made to this object
  64. //
  65. typedef enum HintName
  66. {
  67.     NoHint,
  68.     WordsArePictures,
  69.     WordsAreNotPictures
  70. }
  71. HintName;
  72. //
  73. //    Define our interface. 
  74. //
  75. @interface rtfFile:TextFile
  76. {
  77.     Boolean            QueueHasBegin;
  78.     PositiveInteger    TotalLength;
  79.     Instance            thequeue;
  80.     Boolean            foundRTF;
  81.     HintName        PictureHint;
  82.     PositiveInteger    textOutputLength;    // 93.02.21  Added for bug fix
  83. }
  84. - initAndUse:(roCString) pathname;
  85. - free;
  86. - CloseAndSave;
  87. - GetToken;
  88. - GetNextControlToken;
  89. - GetOpenBraceToken;
  90. - GetCloseBraceToken;
  91. - GetControlToken;
  92. - GetWordToken;
  93. - GetFamilyNameToken;
  94. - WriteToken: theToken;
  95. - FlushQueue: (Integer) instruction;
  96. - FlushPartially: (Integer) instruction;
  97. - (TokenType) Write: (PositiveInteger)  numTokens  TokensAs: (Integer) instruction;
  98. - (Boolean) ClearThroughLastBegin;
  99. - Hint: (HintName) theHint;
  100. - WriteNeXTGraphicAt: (PositiveInteger) loc
  101.             WithName: (CString) fileName
  102.             Width: (Integer) theWidth
  103.             Height: (Integer) theHeight;
  104. @end
  105.  
  106. #define    ERR_NOTOKENFOUND    1034
  107. #define    ERR_BADCHAR            1039
  108. #define    ERR_NOBEGIN            1050
  109.  
  110. #define    PRETTYPRINT            1
  111. #define    ASONELINE                2
  112. #define    MAXLINELENGTH        72
  113.